import { GET_MENU_LIST } from '@/utils/api.js'
import Cookies from 'js-cookie'

let userName = 'sevenzhang'

let isHideB = () => {
  return userName !== 'sevenzhang'
}
const menuList = {
  code: 200,
  msg: 'Succeed!',
  data: [
    {
      name: 'Home',
      title: 'Home',
      icon: 'HomeFilled',
      path: '/home',
      meta: {
        title: 'Home',
        affix: true,
      },
    },
    {
      title: '实验室',
      name: 'gongneng',
      icon: 'opportunity',
      path: '/gongneng',
      hide: isHideB(),
      children: [
        {
          title: 'About',
          name: 'about',
          icon: 'order',
          path: '/about',
        },
        {
          title: 'WorkFlow',
          name: 'WorkFlow',
          icon: 'el-icon-s-order',
          path: '/WorkFlow',
        },
        {
          title: 'DagEdit',
          name: 'DagEdit',
          icon: 'el-icon-s-order',
          path: '/dag-edit',
        },
        {
          title: '看板Demo',
          name: 'DragKanbanDemo',
          icon: 'el-icon-date',
          path: '/DragKanbanDemo',
        },
        {
          title: 'DemoInMode',
          name: 'DemoInMode',
          icon: 'el-icon-s-order',
          path: '/demoinmode',
        },
      ],
    },
    {
      title: '小游戏',
      name: 'xiaoyouxi',
      icon: 'el-icon-s-order',
      path: '/game',
      hide: isHideB(),
      children: [
        {
          title: 'CounterFlips',
          name: 'CounterFlips',
          icon: 'el-icon-s-order',
          path: '/CounterFlips',
        },
        {
          title: 'BinarySearch',
          name: 'BinarySearch',
          icon: 'el-icon-s-order',
          path: '/BinarySearch',
        },
      ],
    },
    {
      title: 'iframe',
      name: 'iframe',
      icon: 'el-icon-guide',
      hide: isHideB(),
      path: '/iframe',
      children: [
        {
          title: 'juejin',
          name: 'link2Frame_https://juejin.cn/',
          icon: 'el-icon-guide',
          path: '/juejin',
          meta: { title: 'juejin' },
        },
        {
          name: 'link2Frame_https://cn.vuejs.org',
          title: 'vue',
          path: '/vuejs',
          meta: { title: 'vuejs' },
          icon: 'el-icon-guide',
        },
      ],
    },
  ],
}

export default { [`get|${GET_MENU_LIST}`]: menuList, menuList: menuList.data }
